package edu.zut.cs.software.estateagent.contract.web.spring.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import edu.zut.cs.software.base.web.spring.controller.GenericController;
import edu.zut.cs.software.estateagent.contract.domain.Contract;
import edu.zut.cs.software.estateagent.contract.service.ContractManager;
@CrossOrigin(origins = "*")
@Controller
@RequestMapping("/contract/contract")
public class ContractController extends GenericController<Contract, Long, ContractManager> {
	ContractManager contractManager;

	@RequestMapping(method = RequestMethod.GET, value = "/index.html")
	public String index() {
		String result = "/contract/index";
		return result;
	}

	@Autowired
	public void setContractManager(ContractManager contractManager) {
		this.contractManager = contractManager;
		this.manager = this.contractManager;
	}
}
